import tkinter as tk
from go_to_page1 import open as go_to_page1
from go_to_page2 import open as go_to_page2
from go_to_page3 import open as go_to_page3
from go_to_page4 import open as go_to_page4


def open(s):
    window = tk.Tk()
    window.title("系统管理人员-" + s)
    window.geometry("400x300")

    label = tk.Label(window, text="请选择你要进行的操作")
    label.pack()

    button1 = tk.Button(window, text="查询植物信息", command=lambda: go_to_page1(s), width=20, height=2)
    button1.pack()

    button2 = tk.Button(window, text="修改植物信息", command=lambda: go_to_page2(s), width=20, height=2)
    button2.pack()

    button3 = tk.Button(window, text="删除植物信息", command=lambda: go_to_page3(s), width=20, height=2)
    button3.pack()

    button4 = tk.Button(window, text="增加", command=lambda: go_to_page4(s), width=20, height=2)
    button4.pack()
    back_button = tk.Button(window, text="返回上一级", command=window.destroy, width=20, height=2)
    back_button.pack()
    window.mainloop()

 #open("登录页面")
